package com.tsd.system.dao;

import com.tsd.common.vo.BatchDeleteLogicVo;
import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysRoleResource;
import com.tsd.system.entity.SysRoleResourceExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysRoleResourceMapper
 *
 * @author Hillpool
 * @date 2019/03/12 12:20:51
 */
public interface SysRoleResourceMapper {

    SysRoleResource selectByPrimaryKey(Long id);

    List<SysRoleResource> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    int deleteByPrimaryKey(Long id);

    int insert(SysRoleResource record);

    int insertSelective(SysRoleResource record);

    int updateByPrimaryKey(SysRoleResource record);

    int updateByPrimaryKeySelective(SysRoleResource record);

    SysRoleResource selectByRoleResource(SysRoleResource record);

    List<SysRoleResource> selectByRoleSid(String roleSid);

    int deleteByRoleSid(String roleSid);

    int deleteByResourceSid(String resourceSid);

    int deleteByList(BatchDeleteLogicVo record);

    void insertList(List<SysRoleResource> list);

    void updateList(List<SysRoleResource> list);

    List<SysRoleResourceExt> selectValidByRoleList(@Param("role_list") List<String> roleList);

    int updateCheckType2Half(@Param("resource_sid") String resource_sid);
}
